package com.itbaizhan.controller;

import com.itbaizhan.pojo.CommonResult;
import com.itbaizhan.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户控制层
 */
@RestController
public class UserController {
    //用户服务，本地调用
    @Autowired
    private IUserService iUserService;

    /**
     * 根据用户ID查询用户订单详情
     *
     * @param userId 用户id
     * @return 调用接口层方法
     * http://localhost:8080/findByUserId?userId=1
     */
    @GetMapping("/findByUserId")
    public CommonResult findByUserId(Long userId) {
        return iUserService.findByUserId(userId);
    }
}
    /*
    * Run Dashboard面板
    * 修改配置文件
在.idea/workspace.xml
* 文件中找到
*<component name="RunDashboard">
 <option name="ruleStates">
  <list>
   <RuleState>
    <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
   </RuleState>
   <RuleState>
    <option name="name" value="StatusDashboardGroupingRule" />
   </RuleState>
  </list>
 </option>
</component>
*
* 添加配置  如果没有找到，直接复制添加
 <component name="RunDashboard">
 <option name="ruleStates">
  <list>
   <RuleState>
    <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
   </RuleState>
   <RuleState>
    <option name="name" value="StatusDashboardGroupingRule" />
   </RuleState>
  </list>
 </option>
 <option name="configurationTypes">
 <set>
  <option value="SpringBootApplicationConfigurationType" />
 </set>
</option>
</component>*/

